package 设计模式.factory;

import 反射.AutWare;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @功能
 * @创建时间 2020/5/30
 */
public class FactoryHander implements InvocationHandler {
    @AutWare
    public Factory benChiFactory;

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Object o = null;
 //       if(method.getName().equals("car")){
            o = method.invoke(benChiFactory.makeCar(),args);
//        }
        return o;
    }
}
